import request from '@/utils/request'

export default {
    //1.添加课程信息
    addCourseInfo(courseInfo){
      return request({
        url: `/eduservice/course/addCourseInfo`,
        method: 'post',
        data:courseInfo
        })  
      },
      getListTeacher(){
        return request({
          url: `/eduservice/course/findAll`,
          method: 'get'
        })
      },
      getCourseInfoId(id){
        return request({
          url: `/eduservice/course/getCourseInfo/`+id,
          method: 'get'
        })
      },
      updateCourseInfoId(courseId){
        return request({
          url: `/eduservice/course/updateCourseInfo`,
          method: 'get',
          data:courseInfo
        })
      },
      getPublishCourseInfoId(id){
        return request({
          url: `/eduservice/course/getPublishCourseInfo/`+id,
          method: 'get'
        })
      },
      publishCourse(id) {
          return request({
            url: `/eduservice/course/publishCourse/`+id,
            method: 'post'
          })
        },
        getListCourse(id) {
          return request({
            url: `/eduservice/course`,
            method: 'get'
          })
        }
}
